@import "~scss/variables";

.sw-cms-detail {
    .sw-cms-detail__content {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: auto;
        display: grid;
        grid-template-rows: auto 1fr;
    }

    .sw-cms-detail__page-info {
        display: flex;
        gap: 20px;
        align-items: center;
    }

    .sw-cms-detail__back-btn {
        padding-right: 20px;
        height: 80px;
        line-height: 80px;
        border-right: 1px solid $color-gray-300;
        color: $color-darkgray-200;

        &:hover {
            color: $color-shopware-brand-500;
        }

        .mt-icon {
            padding: 3px;
        }
    }

    .sw-cms-detail__page-name {
        max-width: 260px;
        text-overflow: ellipsis;
    }

    .sw-cms-detail__page-type {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: $color-gray-300;
    }

    .sw-cms-detail__page-defaults {
        font-weight: $font-weight-semi-bold;
        font-size: $font-size-xxs;
        line-height: 16px;
        color: $color-white;
        padding: 4px 8px;
        background: $color-gray-500;
        border-radius: 4px;
    }

    .sw-cms-detail__device-actions {
        display: grid;
        grid-template-columns: 24px 24px 24px 24px;
        grid-column-gap: 20px;
        align-content: center;
        align-items: center;
        justify-content: start;
        justify-items: center;

        .mt-icon {
            color: $color-gray-300;
            cursor: pointer;

            &:hover {
                color: $color-darkgray-200;
            }

            &.is--active {
                color: $color-shopware-brand-500;
            }

            &.is--disabled {
                cursor: not-allowed;

                &:hover {
                    color: $color-gray-300;
                }
            }
        }
    }

    .sw-cms-detail__actions {
        display: grid;
        grid-template-columns: 2fr 1fr;
        grid-column-gap: 8px;
        align-content: center;
        align-items: center;

        .sw-field.sw-field--select {
            margin: 0;

            &.sw-field--select select,
            &.sw-field--select .sw-field__select-load-placeholder {
                padding: 8px 16px;
                line-height: 22px;
                height: 40px;
                font-size: $font-size-xs;
            }
        }
    }

    .sw-cms-detail__stage-container {
        display: grid;
        grid-template-columns: 1fr auto;
        position: relative;
        overflow: hidden;

        .sw-cms-detail__page-notification {
            display: grid;

            .sw-cms-detail__page-notification-alert {
                z-index: $z-index-over-overlay;
                width: 80%;
                max-width: 700px;
                margin-bottom: 20px;
                margin-top: 20px;
            }
        }

        .sw-cms-detail__page-form {
            padding-top: 50px;
            overflow-y: auto;
            overflow-x: hidden;
            position: relative;
        }

        .sw-cms-detail__stage {
            overflow-y: auto;
            overflow-x: hidden;
            position: relative;
            background: $color-gray-50;
        }

        .sw-cms-detail__empty-stage {
            height: 100%;
            background: $color-gray-50;
            display: grid;
            align-items: center;
            align-content: center;
            justify-items: center;
            justify-content: center;
            cursor: auto;

            &.is--valid-drop {
                background-color: $color-shopware-brand-50;
                border-color: $color-shopware-brand-500;
            }

            .sw-cms-detail__empty-stage-content {
                text-align: center;
                max-width: 448px;
                margin: auto;
            }

            h2.sw-cms-detail__empty-stage-headline {
                font-size: 32px;
                font-weight: $font-weight-regular;
                margin-bottom: 5px;
            }
        }

        .sw-cms-stage {
            background: $color-white;
            border: 0 none;
            position: relative;
            margin: auto;
            transition: max-width 0.4s ease-in-out, border-width 0.4s ease-in-out;
            box-sizing: content-box;
        }
    }
}
